<template>
  <div id="promptMsg">
    <promptMsg :v-if="promptFlag" :Msg="$route.meta"/>
  </div>
</template>

<script>
import promptMsg from "@/components/promptMsg/promptMsg";

export default {
  name: "index",
  data() {
    return {
      promptFlag: false
    }
  },
  components: {
    promptMsg
  },
  watch: {
    $route: {
      handler() {
        this.promptFlag = this.isRoute;
      }
      ,
      immediate: true,
      deep: true

    }
  },
  methods: {},
  computed: {
    isRoute() {
      if (this.$route.meta['promptMsg']) {
        return true
      }
      return false
    }
  }
}
</script>

<style scoped lang="scss">
#promptMsg {
  width: 100%;
  overflow: hidden;
  position: relative;
}

</style>